import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'

Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'Home',
    component: () => import('../views/Home.vue'),
    children:[
      {
        path:"product",
        component: () => import('../views/Product.vue')
      },
      {
        path:"addproduct",
        component: () => import('../views/AddProduct.vue')
      },
      {
        path:"updateproduct",
        component: () => import('../views/UpdateProduct.vue')
      },
      {
        path:"order",
        component: () => import('../views/Order.vue')
      },
      {
        path:"index",
        component: () => import('../views/Index.vue')
      },
    ]
  },
  {
    path: '/register',
    name: 'Register',
    component: () => import('../views/Register.vue')
  },
  {
    path: '/login',
    name: 'Login',
    component: () => import('../views/Login.vue')
  }
]
const router = new VueRouter({
  routes
})

export default router
